import { getIndexData } from "../../utils/api";

const indexModule = {
  state: {
    res: null,
  },
  mutations: {
    getIndex(state, playload) {
      state.res = playload.result;
    },
  },
  actions: {
    async getIndexAsync({ commit }) {
      const res = await getIndexData();
      // console.log(res.data);
      commit("getIndex", res.data);
    },
  },
  modules: {},
};

export default indexModule;
